<template>
    <div class="all">
             <div class="h-top">
                 <img @click="fh" src="../../image//my_img/返回箭头.png" style="width: 32px; height: 32px; color: #f2f2f2;" alt="" class="img-left" >
                 <span class="myq">查看认证信息</span>
                 </div>

                 <div class="main">
                        <img class="main-img" src="../../image//my_img/身份证2.png" alt="">
                             <button @click="gohome" class="btn">返回</button>

                 </div>

                   <div class="main-text" >
                             <p>{{ idlist[0].name}}</p>
                             <p>男 <span>汉族</span></p>
                             <p>{{ idlist[0].Identity_nbr }}</p>
                         </div>
    </div>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import { useRouter } from 'vue-router'


const router=useRouter()

const fh=()=>{
     router.go(-1)
}

const idlist = ref(null);

const idata = () => {
  try {
    const storedData = localStorage.getItem('data_list');
    if (storedData) {
      idlist.value = JSON.parse(storedData);
    } else {
      idlist.value = null;
    }
  } catch (error) {
    console.error('从 localStorage 获取或解析 data_list 时出错:', error);
    idlist.value = null;
  }
};
idata();

const gohome=()=>{
     router.push('/userchild')
}

</script>

<style scoped>
  .all{
    display: flex;
    display: inline-block;
    width: 100%;
    height: 670px;
    background-color: #f2f2f2;
  }
  .h-top{
      display: flex;
      width: 100%;
      height: 60px;
      background-color: #fff;
      align-items: center;

  }
   .img-left{
        margin-left: 30px;
   }
   .myq{
       margin-left: 100px;
       font-size: 17px;

   }
   .main{
    display: flex;
    display: inline-block;
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 600px;
    background-color: #fff;
    margin-top: 10px;

   }
   .main-img{
    width: 300px;
    height: 160px;
    margin-left: 38px;
    margin-top: 10px;
   }
   .main-text{
    display: flex;
    display: inline-block;
   }
   .main-text{
        position: absolute;
        left: 70px;
        top: 90px;
        color: #ffff;
        line-height: 25px;
   }

   .btn{
         display: flex;
         padding: 10px 130px 10px 130px;
         border: none;
         margin-left: 40px;
         text-align: center;
         align-items: center;
         background-color: #3087ea;
         font-size: 16px;
         color: #fff;
   }


</style>
